﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageSpamKeyword.aspx.cs" Inherits="famails.BackEnd.page.ManageSpamKeyword" MasterPageFile="~/Master.Master" %>
<%@ Register assembly="CollectionPager" namespace="SiteUtils" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<style>

    .hung a {
        padding: 3px 5px;
        text-decoration: none;
        background:#333;
        color:#fff;
        margin:0px 5px;
        border:1px solid #333;
    }
    .hung b {
        padding: 3px 5px;
        text-decoration: none;
        background:#fff;
        color:#333;
        margin:0px 5px;
        border:1px solid #333;
    }
</style>
    <div style="width:100%;padding:10px;">
        <!--start content 01-->
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border:1px solid #333;padding:0px;margin-bottom:10px;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px 20px;background:#000;color:#fff;font-size:18px;font-weight:bold;position:relative;">   
               Thêm từ khóa Spam
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
                <asp:Panel Visible="false" ID="pnError" runat="server">
                    <div class="error-box round">
                        <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                    </div> 
                </asp:Panel>
                <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                    <div class="confirmation-box round">
                        <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
            </div>
            <div class="col-md-4 col-xs-6 col-sm-6 col-lg-4" style="height: auto;padding:10px;">
                <fieldset>
                    
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Từ khóa</label>
                        <asp:TextBox ID="txtKeyword" runat="server" CssClass="form-control" style="border:1px solid #333;border-radius:0px;"></asp:TextBox>                   
                    
                </fieldset>
            </div>
            <div class="col-md-4 col-xs-6 col-sm-6 col-lg-4" style="height: auto;padding:10px;">
                <fieldset>
                    
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Điểm</label>
                        <asp:TextBox ID="txtScore" runat="server" CssClass="form-control" style="border:1px solid #333;border-radius:0px;"></asp:TextBox>                   
                    
                </fieldset>
            </div>
            <div class="col-md-4 col-xs-6 col-sm-6 col-lg-4" style="height: auto;padding:10px;">
                <fieldset>
                    
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Từ đồng nghĩa</label>
                        <asp:TextBox ID="txtSameWord" runat="server" CssClass="form-control" style="border:1px solid #333;border-radius:0px;"></asp:TextBox>                   
                    
                </fieldset>
            </div>
            <div class="col-md-4 col-md-offset-8 col-xs-6 col-sm-6 col-lg-4 col-md-offset-8" style="height: auto;padding:10px;">
                <fieldset>
                    
                        <button runat="server" class="btn" style="float:left;margin-right:10px;background:#333;color:#fff;text-align:center;padding:6px 15px;border-radius:0px;" 
                            onserverclick="btnSave_Click">
                            <i style="margin-right:10px;" class="fa fa-upload"></i> cập nhật
                        </button>
                </fieldset>
            </div>

        </div>
    </div>
    
    <div style="width:100%;padding:10px;">
        <!--start content 01-->
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border:1px solid #333;padding:0px;margin-bottom:10px;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px 20px;background:#000;color:#fff;font-size:18px;font-weight:bold;position:relative;">   
               Bảng từ khóa Spam
            </div>
        
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
                <fieldset>
                    <div class=" table-responsive">
                   <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                        <thead>
                            <tr>
                                <th>Từ khóa</th>
                                <th>Điểm</th>
                                <th>Từ đồng nghĩa</th>
                                <th style="width:100px;">Chức năng</th>
                            </tr>
                        </thead>
                        <tbody>
                    <asp:Repeater ID="dtlSpam" runat="server">
                         <ItemTemplate>
                            <tr>
                                <td>
                                    <asp:Label ID="lblAttr" runat="server" Text='<%# Eval("Keyword") %>' ></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblGmail" runat="server" Text='<%# Eval("Score") %>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblYahooMail" runat="server" Text='<%# Eval("SameWord") %>'></asp:Label>
                                </td>
                                <td style="text-align:center;">
                                    <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="../resource/images/edit-validated-icon.png"
                                    CommandArgument='<%# Eval("Keyword") %>' onclick="btnEdit_Click" />
                                    <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="../resource/images/Delete-icon.png"
                                    CommandArgument='<%# Eval("Keyword") %>' OnClientClick="return confirmDelete('Bạn có chắc rằng sẽ xóa thuộc tính này không ?')" onclick="btnDelete_Click" />
                                </td>
                            </tr>     
                         </ItemTemplate>
                     </asp:Repeater>
                        </tbody>
                    </table>
                        <cc1:CollectionPager
                             ID="dlPager" runat="server"
                            BackNextDisplay="HyperLinks" BackText="<span style='padding:10px;color:#fff;'>Trước</span>" 
                            ControlCssClass="hung pull-right" LabelText="" NextText="<span style='padding:10px;color:#fff;'>Sau</span>" 
                            
                            ResultsFormat="Hiện thị kết quả {0}-{1} ({2})" ResultsLocation="None" SliderSize="5"
                            BackNextLocation="Split" PageNumbersDisplay="Numbers">
                        </cc1:CollectionPager>
                        </div>
                </fieldset>
                
        </div>
        </div>
    </div>
<%--<script>
    $(document).ready(function () {
        $('#dataTables-example').dataTable();
    });
</script>--%>
</asp:Content>

